<template>
  <div>
    <div class="title">
    <p>请输入新密码</p>
  </div>
  <i-form ref="formLogin" :model="formLogin" :rules="ruleLogin" class="safety-item">
    <Form-item prop="code">
      <i-input v-model="formLogin.code" type="password" password size="large" placeholder="请输入新密码"></i-input>
    </Form-item>
    <!-- <Form-item>
      <i-button @click="open('formLogin')" class="save" size="large">确定</i-button>
    </Form-item> -->
  </i-form>
  </div>

</template>
<!-- 主页面需加上：
const modal2 = () => import("../../components/modal/modal2.vue");
components:{ modal2 } -->
<script>
  export default {
    name: 'modal2',
    components:{
    },
    data() {
      return {
        formLogin:{
          code: ''
        },
        ruleLogin:{
          code:[
            {
              required: true,
              message: '8-16位字母和数字组合,且至少2位数字',
              trigger: 'blur'
            }
          ]
         }
      };
    },
    methods: {
      //表单验证
      // open () {
      //   this.$refs['formLogin'].validate((valid) =>{
      //     if (valid) {
      //       this.$Message.success('提交成功!');
      //       this.modal1 = false;
      //     } else {
      //       this.$Message.error('表单验证失败!');
      //     }
      //   })
      // }
    }
  };
</script>

<style>
  .title{
    height: 30px;
    font-size: 16px;
    line-height: 30px;
    margin-bottom: 30px;
  }
</style>
